Skip to content

fix(service-automation)!: the connector pull door refuses an input key its read action does not declare, as connector_action does - #34089

Merged
objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/area-A5-33894
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/area-A5-33894

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #33894

Clause-②: no (narrowing) — a mapping whose connectorSource.input, or the watermark parameter the pull adds to its query, carries a key the read action's inputSchema does not declare used to pull and send that key to the provider; the pull now fails before the call with VALIDATION_ERROR. Nothing published widens: no export, no key, no option is added. First-party mappings affected: 0 (no connectorSource under examples/ or packages/apps/).
Metadata-protocol: narrowed
Skills-docs: none — git grep -i 'connectorSource|watermark' -- skills/ has 0 hits: no published skill teaches the connector pull door's input

维护者速读

  • 改了什么:映射的连接器拉取入口(connectorSource.input)也像 connector_action 节点一样,拒收读取动作 inputSchema 未声明的输入键,包括拉取入口自己加进 query 的水位参数(如 since);拒绝时报 VALIDATION_ERROR,点名该键和修法,不调用外部服务、不写入。
  • 为什么改:维护者裁决 6896271476「多余参数直接报错」:凡是调用连接器动作的入口,对输入一视同仁;以后新入口直接继承,不再回来要裁决。
  • 风险与回滚:收窄。定时拉取没有 fault 边,带多余键的映射每次运行都失败(sys_sync_run 记 failed),直到映射或 OpenAPI 文档修好;水位参数只在目标已有值后才发送,所以首拉成功、第二次起失败。第一方受影响 0 处;rest 连接器的 query 是开放的,不受影响。回滚 = revert 本 PR。
  • 先看:packages/services/service-automation/src/connector-pull.ts 的判定段(打开 refuseUndeclaredKeys,以及单独判定水位参数以便在拒绝句里点名它);connector-pull-undeclared-input-key.test.ts;changeset 的迁移说明。
  • 两分钟验证:pnpm --filter @objectstack/service-automation exec vitest run src/connector-pull-undeclared-input-key.test.ts src/connector-pull.test.ts,预期全部通过(新文件 6 个用例,翻转后的拒绝 pin 在 connector-pull.test.ts)。
  • 需要你做的:无,席位落地(合同档复核由区域安排)。

What changes

  • packages/services/service-automation/src/connector-pull.ts: the pull door judges the input it is about to send with judgeConnectorInput(..., { refuseUndeclaredKeys: true }), as connector_action does (ruling 6896271476: every door that dispatches a connector action judges its input alike). The refusal keeps its VALIDATION_ERROR 400 input_schema_mismatch envelope and appends the pull door's own hint: remove the key from connectorSource.input or declare it in the action (for openapi, in the OpenAPI document). When the undeclared key is the watermark parameter the door added itself (judged alone against the schema, so the sentence never blames the watermark for an author's key), the refusal names it and says to declare it as an in: query parameter of the operation.
  • connector-pull.test.ts: the pin [#33553] an undeclared key is not refused here (formerly 385-398) is flipped in place to a refusal pin: code + status + reason, both undeclared keys named, handler never called, nothing written.
  • New connector-pull-undeclared-input-key.test.ts (named by the card): the door-added watermark key. An openapi-shaped operation that lists only query.limit, and one that emits no query section, both refuse since naming it and the OpenAPI fix; an author's stray key with the watermark declared does not mention the watermark. Controls: the declared watermark is sent; the first pull (nothing stored) sends no watermark and is not refused; a rest connector's open query takes the watermark as before.
  • packages/spec/src/data/mapping.zod.ts (connectorSource.input describe) and the generated content/docs/references/data/mapping.mdx: input is judged before the call; an undeclared key is refused, the watermark parameter included.
  • New semantic migration entry 18.connector-pull-undeclared-input-key-refused (entry 18 connector-action-undeclared-input-key-refused, shipped in 18.5.0, is not touched).
  • content/docs/automation/jobs.mdx: the connectorSource run bullet says the input is judged, names the watermark parameter and the OpenAPI fix, and that a scheduled run has no fault edge, so the refusal fails every run until fixed.
  • BREAKING changeset (minor on @objectstack/service-automation and @objectstack/spec) with the ADR-0087 marker and the FROM → TO migration.

For the sync-in owner (ADR-0153 D2, Proposed): when the pull door starts sending paging parameters (connectorSource.paging), they are judged by this same rule, so the design now presumes the read action declares them; a paging parameter an openapi operation does not list will be refused like the watermark.

Tests

Touched-package suites and typecheck (head before the last main merge; re-run touched files on the final head where noted)
  • pnpm --filter @objectstack/service-automation test: Test Files 283 passed (283), Tests 4003 passed (4003).
  • pnpm --filter @objectstack/service-automation typecheck (tsc + check:test-typecheck): exit 0 after typing the new file's handler (first run named TS2493 in the new file, fixed).
  • pnpm --filter @objectstack/spec test: Test Files 842 passed (842), Tests 26961 passed, 1 todo; pnpm --filter @objectstack/spec typecheck: exit 0.
  • pnpm --filter @objectstack/spec check:generated: 1 of 14 stale (check:docs), regenerated with --fix, committed.
  • The four connector-pull files (unit, new file, integration through the real rest connector, service door): 64 passed.
Ablations (each red, then restored with blob == HEAD and git diff HEAD empty)
  • A, drop { refuseUndeclaredKeys: true } from the door's judge: 4 failed (the flipped pin and three new-file pins), "the pull must refuse, not resolve: expected undefined to be an instance of ConnectorPullError".
  • B, never name the watermark (addedUndeclared = false): 2 failed, "expected ... to contain 'watermark parameter 'since''".
  • C, make the watermark probe always undeclared: 1 failed, "expected ... not to contain 'watermark parameter'".

Acceptance notes

  • First pull edge: the watermark parameter is sent only once the target holds a value, so a mapping whose operation does not declare it pulls once and fails from the second run on. The changeset, the migration entry and the refusal say so; judging it on the first pull too would be a further narrowing not in the ruling.
  • connector-input-schema.ts's header and ConnectorInputJudgeOptions.refuseUndeclaredKeys doc name only the connector_action node as the door that opts in; they stay true but incomplete (outside the claim's file surface, left untouched).
  • packages/spec/docs/SYNC_ARCHITECTURE.md says the pull judges required parameters and types "as a connector_action flow node's is"; it does not list the undeclared-key refusal (outside the claim's file surface).
  • The 18.5.0 changeset for the node half ends "The connector pull door (connectorSource.input) is unchanged."; released text, true when shipped, superseded by this changeset; not edited here.

Verification


Generated by Claude Code

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/service-automation, @objectstack/spec, touching 4 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/connectors.mdx (via /api/v1/automation/connectors (route, a path literal in replacement))
  • content/docs/kernel/cluster.mdx (via /api/v1/automation/connectors (route, a path literal in replacement))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v15.mdx (via /api/v1/automation/connectors (route, a path literal in replacement))
  • content/docs/releases/v18/18-3.mdx (via /api/v1/automation/connectors (route, a path literal in replacement))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 2539ad9860a3e43323fcf35ac80ffee47c8dec3e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 597a3d66bf608760a926b179626ba73f1d44cf0b — the merge of head ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219 into base 2539ad9860a3e43323fcf35ac80ffee47c8dec3e, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 597a3d66bf608760a926b179626ba73f1d44cf0b && git checkout 597a3d66bf608760a926b179626ba73f1d44cf0b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2539ad9860a3e43323fcf35ac80ffee47c8dec3e ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219 && git checkout -B drift-repro 2539ad9860a3e43323fcf35ac80ffee47c8dec3e && git merge --no-ff ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219

node scripts/docs-audit/affected-docs.mjs --json 2539ad9860a3e43323fcf35ac80ffee47c8dec3e

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 2539ad9860a3e43323fcf35ac80ffee47c8dec3e → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added documentation Improvements or additions to documentation protocol:data tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 208c32c · 2026-11-15T21:05Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 208c32c83be614a42ead3c34f8c1007d1e73b2fb
Local-runs: none
Scope: packages/spec/src/data/mapping.zod.ts, packages/spec/src/migrations/entries/semantic/18.connector-pull-undeclared-input-key-refused.ts, packages/services/service-automation/src/connector-pull.ts, packages/services/service-automation/src/connector-pull.test.ts, packages/services/service-automation/src/connector-pull-undeclared-input-key.test.ts, .changeset/33894-connector-pull-undeclared-input-key.md, content/docs/automation/jobs.mdx, content/docs/references/data/mapping.mdx + packages/services/service-automation/src/connector-input-schema.ts, packages/services/service-automation/src/builtin/connector-nodes.ts, packages/connectors/connector-openapi/src/openapi-connector.ts, packages/connectors/connector-rest/src/rest-connector.ts, packages/runtime/src/app-artifact-handlers.ts, packages/spec/src/migrations/types.ts, packages/spec/src/migrations/entries/README.md, packages/spec/docs/SYNC_ARCHITECTURE.md (read, not reviewed)

Read at 2026-11-15T21:12Z. First review of this head, taken on patrol as owed; claim: comment 6901351752. Independence: implemented in a zhuangjianguo lane (domain:server#5); neither dispatched nor implemented by os-tesla.

① Derived judgments

Read: the whole diff from merge base 159757ab to the head (8 files, +302 −11), the card, the ruling 6896271476, and the cited code at the head.

  • Same check. connector-pull.ts (pullOnce, step 6) now calls judgeConnectorInput(inputSchema, input, { refuseUndeclaredKeys: true }): the very function and option builtin/connector-nodes.ts:162-166 uses. There is no second implementation, so nested keys, array items, a null value (refused), an undefined value (absent), exact-case key matching, and which schemas read as open (additionalProperties not false, patternProperties, composition keywords, $ref, no properties, no inputSchema) are identical at both doors by construction.
  • Only narrower by the undeclared keys. The option only ADDS violations after the required / type walk (connector-input-schema.ts:275-288); every input whose keys are all declared is judged exactly as on the merge base. No declared key is newly refused.
  • Envelope. VALIDATION_ERROR, status 400, reason: 'input_schema_mismatch': the pull door's existing envelope for this judgment, unchanged. The node returns code: 'VALIDATION_ERROR' on a step failure; the violation sentence ('query.stale' is not an input the action declares (declared in 'query': …)) is the judge's and so the same text. Each door keeps its own remedy hint, as the shared module's header prescribes. The refusal names key paths and declared key names only, never a value.
  • Every door into the pull. registry.resolveConnectorAction has two callers in the tree: the node and connector-pull.ts:691. Every pull (a job's scheduled pull, a manual trigger, a direct IAutomationService.pullConnectorSource call) goes through pullConnectorSource → pullOnce, one judge site. A run stores no input: each run and each retryPolicy retry re-reads the mapping and rebuilds the input, so there is no old-input resume path that skips the judge.
  • The door-added key. The input judged is the one sent, watermark merged in. The second judgment ({ query: { [param]: from } } alone) only decides whether the refusal names the watermark; it cannot refuse on its own and cannot blame the watermark when it is declared (the third new pin holds that).
  • Upgrade. A stored mapping with a stray key, or a watermark parameter its openapi operation does not declare, fails every run from the first run after the upgrade (the target already holds a value), sys_sync_run failed, nothing written. Declared in the changeset, the semantic entry, jobs.mdx and the generated reference, each with the remedy. First-party affected: 0, confirmed (connectorSource has no hit under examples/, packages/apps/, skills/).
  • Producer shapes in the pins are the real ones. buildInputSchema (openapi-connector.ts) emits a section only when the operation declares a parameter in it, and rest's request declares query with no properties: the test literals match.
  • Pins. The flipped pin asserts code + status + reason, both keys, handler never called, nothing written. The new file has three refusal pins and three named CONTROLs (declared watermark sent; first pull not refused; rest open query). The author's three ablations each go red on the pins that claim them.
  • Spec face. Describe text only; no shape change, so no JSON-schema or authorable-surface baseline moves. The old sentence exists in exactly two files on the merge base and both are updated. The new entry is a drop-in file (registry.ts is generated and git-ignored); entry 18 connector-action-… is untouched, as the ruling requires.

② Semver level

minor on @objectstack/service-automation and @objectstack/spec: correct. Metadata-protocol: narrowed takes at least minor on each package the diff moves, and both move. Clause-②: no (narrowing) and Metadata-protocol: narrowed are line-initial in the PR body and the changeset; the title carries !; the changeset carries the BREAKING banner, exactly one ADR-0087 marker (registered connector-pull-undeclared-input-key-refused, matching the entry id), the FROM → TO pairs and the one-line fixes. Skills-docs: none holds.

CI on this head: 68 check-runs, all completed: 58 success, 10 skipped, 0 failed, 0 running. The PASS below is not taken ahead of any running check.

③ Boundary flags

  • No security finding. The change closes a pass-through (a key no action declares no longer reaches the provider) and opens none.
  • No file outside the claim's surface is touched. The three prose places the author names as left stale are outside it and are graded in ④.
  • Release-owned pages (content/docs/releases/, CHANGELOG.md) are not edited.
  • For the sync-in owner (ADR-0153 D2): the PR body's note stands; paging parameters the door will add are judged by this rule.

④ Design judgment

The narrowing makes the published rule real rather than taking a capability away: inputSchema is the contract GET /api/v1/automation/connectors shows, and the ruling says every dispatching door judges alike. The implementation is the smallest one that does it, with one shared judge.

No must-fix.

S1 (should-fix) — A NEW mapping whose openapi operation does not declare the watermark parameter passes its first pull and fails every later one. The PR declares this and is right that refusing the first pull is outside the ruling. But the door already holds everything needed to say so on that first run: when watermark is declared and from is undefined, judge { query: { [param]: … } } for an undeclared key and log one warn naming the parameter and the OpenAPI fix. No new refusal, and the author learns on the green run instead of the first red one. In this PR or a follow-up card.

S2 (should-fix) — connector-input-schema.ts now misdescribes its own callers. Its header says the node is the door that opts in, and ConnectorInputJudgeOptions.refuseUndeclaredKeys says "Off by default: a door that sends only keys it adds itself leaves it off until its own authors are told", which is the pull door, which no longer leaves it off. The ruling also says future doors inherit the rule; with the option default-off a third door inherits nothing unless its author remembers. Follow-up: correct the two comments, and either flip the default or drop the option.

S3 (should-fix) — packages/spec/docs/SYNC_ARCHITECTURE.md "How a pull runs" still lists only a missing required parameter and a wrong type, and its watermark bullet does not say the parameter must be declared. jobs.mdx links to that section for the watermark in the very sentence this PR extends. Follow-up card, one sentence each.

S4 (should-fix) — The changeset says an operation that "names no query parameter at all" refuses the watermark. That holds only when the operation declares some other parameter or a body. An operation with no parameter and no body has no inputSchema at all (buildInputSchema returns undefined), so the watermark is sent, as the changeset's own last paragraph implies. jobs.mdx and the input describe ("must declare it") carry the same over-statement. Fix the clause before the changeset is released text: "…(or names none in query while declaring a parameter elsewhere or a body)…", and say that such an operation starts refusing the day it gains its first parameter.

N1 (nit) — When the only undeclared key is the watermark parameter, the refusal still says "remove it from connectorSource.input" before the watermark sentence corrects it. Skip the generic hint when every undeclared key is door-added, or lead with the watermark sentence.

N2 (nit) — No pin asserts the generic hint sentence ("remove it from connectorSource.input, or declare it in the action"); dropping it turns nothing red.

N3 (nit) — "then let the connector re-materialize" does not say how (republish the connector entry, or restart).

N4 (nit) — The rule for watermark.param is written under input's describe only; an author filling watermark reads the watermark row, which does not mention it.

Card acceptance: met. The door opts in with its own hint; the pin is flipped to code + status and ablated; the declaration lines, minor, the ADR-0087 disposition, a new entry (entry 18 not widened) and its own breaking note are all present; the ruling's additions (door-added key named, OpenAPI fix, no fault edge, docs, the ADR-0153 note) are present.

Implemented-by: claude/area-A5-33894
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review claim (review-a, S3) · head 208c32c · 2026-11-15T21:59Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS

Head-sha: 208c32c83be614a42ead3c34f8c1007d1e73b2fb
Reviewer: review-a (areas S1 + S3) · read 2026-11-15T22:01Z · diff read against the merge's main parent 159757ab (8 files, +302/−11, matches the PR files list)
Implemented-by: session_01QsR2jTEivi2wogPpeo3xd5 (area S3 dispatch) · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM
Ruling reviewed against: 6896271476

Contract face: this is a declared narrowing with packages/spec/src paths, so the review is owed at CONTRACT_REVIEW_TIER. Its record is comment 6901440860 (review#2, PASS) at this same head, by a reviewer that neither dispatched nor implemented the change. This verdict is the ordinary ACCEPT read and does not repeat that record.

The open point (dev report 6901990244): accepted as a stated deviation. A new mapping whose openapi operation does not declare the watermark parameter passes its first pull and fails every later one. This is the ruling's route, judged by what is sent: on the first pull the target holds no value, so the pull sends no watermark and nothing undeclared reaches the provider.

  • Refusing that first pull would refuse a key the request does not carry. That is a new rule beyond ruling 6896271476.
  • The delay is declared where an upgrader and an author look: in the changeset ("a mapping whose first pull wrote rows fails from its second pull on"), in the semantic entry's reason, in jobs.mdx and in the generated mapping.mdx row. Each carries the OpenAPI remedy.
  • A CONTROL pins the first-pull leg, and the refusal names the watermark parameter and its fix.

Two ways to close the gap later, neither owed here:

  • The record's S1: one warn on the first run when the watermark parameter would be undeclared. It adds no new refusal, and the area can take it as a follow-up card.
  • A check at publish time that watermark.param is declared by the action would be a new refusal at another door. That needs a ruling first.

What holds (rest of the diff)

  • One judge. The pull door calls the node's own judgeConnectorInput(…, { refuseUndeclaredKeys: true }). The second, watermark-only judgment decides only whether the message names the watermark, and it can never refuse on its own.
  • The envelope is unchanged. VALIDATION_ERROR, status 400, input_schema_mismatch. The new sentences name key paths and declared names, never a value.
  • Tests. The flipped pin plus a new file with three refusal pins and three named CONTROLs (the declared watermark is sent, the first pull is not refused, rest's open query is not refused). The ablations are accepted as reported.
  • Declaration. The title carries !. The changeset has the BREAKING banner, one ADR-0087 marker matching the semantic entry id, and FROM → TO pairs. Both packages take minor. First-party mappings affected: 0.

Owed after landing (the record's should-fixes; the head does not move for them)

  • S1: the first-run warn, above.
  • S2: the comments in connector-input-schema.ts that still call the option default-off.
  • S3: one sentence for SYNC_ARCHITECTURE.md.
  • S4: the changeset's "names no query parameter at all" overstates the case for an operation with no parameters and no body, because that operation has no inputSchema. This is release text, so the fix must land before the next Version Packages run. Fix it here as a prose-only delta, or in a follow-up that lands first.

The area files the cards and names them in the PR's Acceptance notes.

Gates: at review time 58 success, 10 skipped, none red, so every check is green.

…r and no body is not judged until it gains one

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Contract review — delta

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d16e1609fe4de198bd2eccd7cd63b7a05564def4
Local-runs: none
Scope: packages/spec/src/data/mapping.zod.ts + packages/services/service-automation/src/connector-pull-undeclared-input-key.test.ts
Prior record: 6901440860

Read: git diff 208c32c8 4adce2c4 (commits e74cc24f, 4adce2c4; 5 files, +19 −7), and at the head buildInputSchema (openapi-connector.ts:524-578), judgeConnectorInput / collectInputSchemaViolations / declaredKeysOf (connector-input-schema.ts) and pullOnce step 6 (connector-pull.ts). Nothing was checked out, built or run.

The head d16e1609 is a merge of main (parents 4adce2c4 and b4eea885, merge base 159757ab). The main side changes 233 files and none of the PR's 8; none of them is openapi-connector.ts, connector-input-schema.ts, connector-pull.ts or connector-nodes.ts. The PR's 8 files are byte-identical between 4adce2c4 and the head.

S4 status

Fixed in all four places.

  • .changeset/33894-connector-pull-undeclared-input-key.md: the "(or names no query parameter at all)" clause is replaced by "(or names none in query while declaring a parameter elsewhere or a body)", followed by a sentence on the operation with no parameter and no body, and when it starts refusing.
  • content/docs/automation/jobs.mdx: "must declare it" is now conditioned on the operation declaring any parameter or a body, with the same exception and the same "until the day" sentence.
  • packages/spec/src/data/mapping.zod.ts connectorSource.input describe: same condition and exception.
  • content/docs/references/data/mapping.mdx: the input row carries the describe's new text word for word.

No copy of either old sentence is left in the tree at the head.

Sentences checked

  • "An operation with no parameter and no body has no inputSchema": true. With no parameter no section is emitted, with no requestBody no body, and buildInputSchema returns undefined when properties is empty.
  • "so nothing is judged and the watermark is sent": true. judgeConnectorInput(undefined, …) returns undefined (collectInputSchemaViolations returns at once for a schema that is not a plain record), so pullOnce calls the handler with the watermark merged into query.
  • "names none in query while declaring a parameter elsewhere or a body … refuses it": true for a declared path or header parameter or any requestBody. The top-level schema then lists properties without query, so query itself is the undeclared key. The existing pin with a header-only schema holds this.
  • "it starts refusing the watermark the day the document gives it its first parameter or a body, unless the watermark parameter is declared with it": true for a parameter the generator emits; see N1 for the ones it does not.
  • "A rest connector's request … reads as open": unchanged and still true.

Findings

No must-fix. No should-fix.

N1 (nit) — "declares any parameter" is still slightly wider than the generator. A parameter buildInputSchema skips emits no section: an in: cookie parameter, an Accept / Content-Type / Authorization header, and the header or query parameter the connector's own auth or an apiKey scheme fills. An operation whose only parameters are of those kinds still has no inputSchema, and gaining one of them does not start the refusal. An unresolved $ref parameter goes the other way: it opens query (additionalProperties: true), so the watermark is sent undeclared. The over-statement only ever tells an author to declare a parameter they did not strictly need to, which is harmless, so it does not block. "declares any path, query or header parameter the action's inputSchema lists" would be exact.

N2 (nit) — The new CONTROL pins the door's half (no inputSchema ⇒ not judged, watermark sent). The producer's half (an operation with no parameter and no body yields no inputSchema) is asserted by nothing in this file; the pin's title states it as fact. A one-line assertion in the connector-openapi tests would tie the two together, if none exists there already.

The CONTROL pin

It asserts the right thing. harness({ inputSchema: undefined, input: {}, stored: STORED }) gives an action descriptor with no inputSchema (the harness has no resolveConnectorActionInputSchema, so the descriptor is what findConnectorActionInputSchema reads), a target that already holds a value, and so a pull that adds query.since. The pin expects one handler call with exactly { query: { since: '2026-01-02T00:00:00.000Z' } }. It goes red if an absent schema were ever read as closed, and it is the counterpart of the header-only refusal pin beside it. The harness's parameter type is widened to | undefined; no other test's input changes.

Describe change

Text only. The input field stays z.record(z.string(), z.unknown()).optional(); no key, type, default or refinement moves. The only generated file that follows is content/docs/references/data/mapping.mdx, and it matches. No JSON-schema or authorable-surface baseline is in the delta, and the gates that would catch a stale one are green.

Gates

68 check-runs on d16e1609, all completed: 58 success, 10 skipped, 0 failed, 0 running.

The prior record's S1, S2, S3 and N1–N4 are outside this delta and stand as written there.

Implemented-by: claude/area-A5-33894
Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS (delta)

Head-sha: d16e1609fe4de198bd2eccd7cd63b7a05564def4
Reviewer: review-a (areas S1 + S3) · read 2026-11-15T23:23Z · delta 208c32c8..d16e1609. The PR's own changes are e74cc24f (the prose fix plus one CONTROL pin) and 4adce2c4 (the regenerated mapping.mdx), 5 files, +19/−7. The rest is a clean main merge (main parent b4eea885) that touches none of the PR's 8 files.
Implemented-by: session_01QsR2jTEivi2wogPpeo3xd5 (area S3 dispatch) · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM; the contract face by an isolated sub-agent at CONTRACT_REVIEW_TIER
Prior verdict: PASS 6902082755 · prior record 6901440860 (S4 owed before release)

S4: fixed in all four places. The changeset, jobs.mdx, the connectorSource.input describe and the regenerated mapping.mdx now say what happens for an operation with no parameter and no body: it has no inputSchema, so nothing is judged and the watermark is sent, and it starts refusing the day it gains its first parameter or a body. The new CONTROL pins the door's side of this (an absent inputSchema, the watermark sent). The delta contract record is comment 6903107055 (PASS, Local-runs: none), and it checks each sentence against buildInputSchema, judgeConnectorInput and pullOnce. The describe change is text only, so nothing else moves, and the earlier declaration, changeset levels and BREAKING note are unchanged.

Nits (no re-review needed)

  1. From the record: "declares any parameter" is still a little wide. Cookie parameters, ignored headers and auth-filled parameters emit no section, and an unresolved $ref parameter opens query. This could go into the service-automation: after the pull door started refusing undeclared input keys, three follow-ups remain (a first-run warning, the shared judge's comments and default, SYNC_ARCHITECTURE.md) #34151 follow-up.
  2. The 维护者速读 test count (6 → 7) will be corrected in the seat record, as the area said.

Gates: at review time 58 success, 10 skipped, none red, so every check is green. The PR can land.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

席位核对

ACCEPT and landing · area S3 · 2026-11-16T00:02Z · head ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219

Ready + auto-merge under the area S3 landing line (maintainer, project thread, 2026-11-15T11:06Z) and the pm-dispatch landing procedure (maintainer, 2026-11-15T15:56Z).


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 00:02
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 61ded62 Nov 16, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant